package com.nineclock.system;

import com.nineclock.attendance.dto.DepartmentOrUserSimpleDTO;
import com.nineclock.common.entity.PageResult;
import com.nineclock.common.entity.Result;
import com.nineclock.system.dto.SysCompanyUserDTO;
import com.nineclock.system.dto.SysDepartmentDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
@Api(value = "组织架构管理", tags = "系统服务")
public interface OrganizationControllerApi {

    @ApiOperation("获取当前企业所有的员工列表")
    public Result<List<SysCompanyUserDTO>> getCompanyUserList();

    @ApiOperation(value = "查询组织部门列表")
    public Result<List<SysDepartmentDTO>> queryDepartmentList();


    @ApiOperation("分页查询部门的员工列表")
    public Result<PageResult<SysCompanyUserDTO>> members(Integer page, Integer pageSize, String keyword, Long departmentId);

    @ApiOperation(value = "直接导入企业员工")
    public Result uploadExcel(MultipartFile excelFile) throws IOException;

    @ApiOperation("查询顶级部门的id")
    public Result<List<Long>> queryDepartmentIds();

    @ApiOperation("根据部门id查询子部门的人数")
    public Result<Integer> queryUserCountByDepartmentIds(List<Long> departmentIds);

    @ApiOperation(value = "根据部门ID查询子部门及员工列表")
    public Result<List<DepartmentOrUserSimpleDTO>> querySimpleDepartment(Long departmentId, Integer includeMember);
}
